﻿using Me.Amon.POS.C;

namespace Me.Amon.POS.M
{
    public class MEmp : MPos
    {
        /// <summary>
        /// 公司
        /// </summary>
        public string corp_id;
        /// <summary>
        /// 角色
        /// </summary>
        public int actor;
        public int sex;
        public string user;
        /// <summary>
        /// 名
        /// </summary>
        public string first_name;
        /// <summary>
        /// 姓
        /// </summary>
        public string last_name;
        /// <summary>
        /// 显示名称
        /// </summary>
        public string display_name;
        public string birthday;
        public string uid;
        public string pass;
        /// <summary>
        /// 手机
        /// </summary>
        public string cellphone;
        /// <summary>
        /// 电话
        /// </summary>
        public string telephone;
        /// <summary>
        /// 
        /// </summary>
        public string engage_date;
        /// <summary>
        /// 
        /// </summary>
        public string layoff_date;

        public MEmp()
        {
            code = "";
            display_name = "";
            actor = 1;
        }

        public override string ToString()
        {
            return display_name;
        }

        public static string GetSex(object sex)
        {
            if (sex is int)
            {
                switch ((int)sex)
                {
                    case CEmp.SEX_MALE:
                        return "男";
                    case CEmp.SEX_FEMALE:
                        return "女";
                    default:
                        return "保密";
                }
            }
            return "-";
        }
    }
}
